package com.usian.article.feign;

import com.usian.model.behavior.pojos.ApBehaviorEntry;
import com.usian.model.behavior.pojos.ApLikesBehavior;
import com.usian.model.behavior.pojos.ApUnlikesBehavior;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("leadnews-behavior")
public interface BehaviorFeign {

    //查询行为实体
    @PostMapping("/api/v1/behavior/entryfind")
    ApBehaviorEntry findByUserIdOrEquipmentId(@RequestParam Integer userId ,@RequestParam Integer equipmentId);

    //查询点赞的
    @PostMapping("/api/v1/behavior/like_query")
    ApLikesBehavior getLike(@RequestParam Long articleId, @RequestParam Integer entryId, @RequestParam  Integer type);

    //查询不喜欢的
    @PostMapping("/api/v1/behavior/getUnLike/{entryId}/{articleId}")
    ApUnlikesBehavior getUnLike(@PathVariable Integer entryId, @PathVariable Long articleId);


}
